package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.AsysStudentBenefitMapper;
import com.ruoyi.system.domain.AsysStudentBenefit;
import com.ruoyi.system.service.IAsysStudentBenefitService;

/**
 * 学生作业减免权益配置Service业务层处理
 *
 * @author 杨佳霖
 * @date 2025-08-29
 */
@Service
public class AsysStudentBenefitServiceImpl implements IAsysStudentBenefitService
{
    @Autowired
    private AsysStudentBenefitMapper asysStudentBenefitMapper;

    /**
     * 查询学生作业减免权益配置
     *
     * @param id 学生作业减免权益配置主键
     * @return 学生作业减免权益配置
     */
    @Override
    public AsysStudentBenefit selectAsysStudentBenefitById(Long id)
    {
        return asysStudentBenefitMapper.selectAsysStudentBenefitById(id);
    }

    /**
     * 查询学生作业减免权益配置列表
     *
     * @param asysStudentBenefit 学生作业减免权益配置
     * @return 学生作业减免权益配置
     */
    @Override
    public List<AsysStudentBenefit> selectAsysStudentBenefitList(AsysStudentBenefit asysStudentBenefit)
    {
        return asysStudentBenefitMapper.selectAsysStudentBenefitList(asysStudentBenefit);
    }

    /**
     * 新增学生作业减免权益配置
     *
     * @param asysStudentBenefit 学生作业减免权益配置
     * @return 结果
     */
    @Override
    public int insertAsysStudentBenefit(AsysStudentBenefit asysStudentBenefit)
    {
        asysStudentBenefit.setCreateTime(DateUtils.getNowDate());
        return asysStudentBenefitMapper.insertAsysStudentBenefit(asysStudentBenefit);
    }

    /**
     * 修改学生作业减免权益配置
     *
     * @param asysStudentBenefit 学生作业减免权益配置
     * @return 结果
     */
    @Override
    public int updateAsysStudentBenefit(AsysStudentBenefit asysStudentBenefit)
    {
        asysStudentBenefit.setUpdateTime(DateUtils.getNowDate());
        return asysStudentBenefitMapper.updateAsysStudentBenefit(asysStudentBenefit);
    }

    /**
     * 批量删除学生作业减免权益配置
     *
     * @param ids 需要删除的学生作业减免权益配置主键
     * @return 结果
     */
    @Override
    public int deleteAsysStudentBenefitByIds(Long[] ids)
    {
        return asysStudentBenefitMapper.deleteAsysStudentBenefitByIds(ids);
    }

    /**
     * 删除学生作业减免权益配置信息
     *
     * @param id 学生作业减免权益配置主键
     * @return 结果
     */
    @Override
    public int deleteAsysStudentBenefitById(Long id)
    {
        return asysStudentBenefitMapper.deleteAsysStudentBenefitById(id);
    }
}
